Skip to content

Add SingleBitOperations #4415

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 27 commits into from
Sep 30, 2023
Merged

Conversation

lukasb1b
Copy link
Contributor

#4350 as its not done yet

  • I have read CONTRIBUTING.md.
  • This pull request is all my own work -- I have not plagiarized it.
  • All filenames are in PascalCase.
  • All functions and variable names follow Java naming conventions.
  • All new algorithms have a URL in their comments that points to Wikipedia or other similar explanations.

@vil02 vil02 self-assigned this Sep 27, 2023
Copy link
Member

@vil02 vil02 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would suggest to rename this class to SingleBitOperations.

Copy link
Member

@vil02 vil02 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you use the name SingleBitOperator and not SingleBitOperations?

I think the second name makes more sense in this context:

  • this class defines single bit operations,
  • it is not a single bit operator.

Please rebase (cf. #4422). Sorry for the confusion with merging.

Copy link
Contributor Author

@lukasb1b lukasb1b left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why does the programm need this private constructor?

@vil02
Copy link
Member

vil02 commented Sep 29, 2023

Why does the programm need this private constructor?

Your class has only static methods. Therefore it does not really make sense to have objects of this class. Marking the default constructor as private (and not having other ones) makes it impossible to create objects of that class. Without this, one could still write something like var obj = SingleBitOperator();, but as said earlier, it does not really make sense.

Also JaCoCo will show now 100% coverage for your file.

@lukasb1b
Copy link
Contributor Author

Ok that does make sense

@vil02
Copy link
Member

vil02 commented Sep 29, 2023

@lukasb1b please have a look at this comment about renaming.

@lukasb1b
Copy link
Contributor Author

@vil02 changed the naming

@vil02 vil02 changed the title Single bit operators Add SingleBitOperations Sep 30, 2023
@vil02 vil02 merged commit e5d33f3 into TheAlgorithms:master Sep 30, 2023
@lukasb1b lukasb1b deleted the SingleBitOperators branch September 30, 2023 08:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants